package com.guoguo.service.impl;

import com.guoguo.entity.SysVersion;
import com.guoguo.mapper.SysVersionMapper;
import com.guoguo.service.ISysVersionService;
import com.guoguo.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/9/15 0015.
 */

     /*
                           _ooOoo_
                          o8888888o
                          88" . "88
                          (| -_- |)
                          O\  =  /O
                       ____/`---'\____
                     .'  \\|     |//  `.
                    /  \\|||  :  |||//  \
                   /  _||||| -:- |||||-  \
                   |   | \\\  -  /// |   |
                   | \_|  ''\---/''  |   |
                   \  .-\__  `-`  ___/-. /
                 ___`. .'  /--.--\  `. . __
              ."" '<  `.___\_<|>_/___.'  >'"".
             | | :  `- \`.;`\ _ /`;.`/ - ` : | |
             \  \ `-.   \_ __\ /__ _/   .-` /  /
        ======`-.____`-.___\_____/___.-`____.-'======
                           `=---='
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                 佛祖保佑       永无BUG
        */
@Service
public class SysVersionServiceImpl implements ISysVersionService {
    @Autowired
    private SysVersionMapper sysVersionMapper;

    public SysVersion findNewVersion( int phonetype) {
        List<SysVersion> sysVersionList = sysVersionMapper.findNewVersion(phonetype);
        if (sysVersionList.size() > 0) {
            return sysVersionList.get(0);
        }
        return null;
    }
}
